import 'package:fluro_decorate/fluro_decorate.dart';
import 'package:fluro_decorate/src/page_builder.dart';

import 'demo.dart';
import 'main_page.dart';
import 'one_page.dart';
import 'two_page.dart';

///
/// @ProjectName:    fluro_demo
/// @Package:
/// @ClassName:      router_pages
/// @Description:    dart文件作用
/// @Author:         WTT
/// @CreateDate:     2021/10/27 5:54 下午
class RouterPages extends RouterRegister {
  @override
  Map<String, PageBuilder> onInit() {
    Map<String, PageBuilder> map = {};
    map["/"] = PageBuilder(builder: (bundle) {
      return MainPage(bundle: bundle);
    });
    map["/one"] = PageBuilder(builder: (bundle) {
      int id = bundle.getInt("id");
      return OnePage(id);
    });
    map["/twoPage"] = PageBuilder(builder: (bundle) {
      return TwoPage();
    });
    map["/demoPage"] = PageBuilder(builder: (bundle) {
      return Demo();
    });
    return map;
  }
}
